package asteroids.statement;
import asteroids.*;
import asteroids.model.programs.*;

import asteroids.statement.Statement.StatementType;

public class FireStatement extends ActionStatement {

	public FireStatement() {
		super();
		
	}
	
	@Override
	public void execute(Program program) {
		if(program instanceof Program) {
			Ship ship = program.getOwner();
		if(ship != null && ship.getWorld() != null) {
			ship.getWorld().fireBullet(ship);
		}
		}
		this.finished = true;
	}

	@Override
	public int getSize() {
		return 1;
	}

}
